#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
int main()
{
	char ch[200] = { 0 };
	int arr[30] = { 0 };
	scanf("%[^\n]", ch);
	int count = 0;
	for (int i = 0; i < 200; i++)
	{
		if (!ch[i])break;
		if (ch[i] == ' ')
		{
			count++;
		}
	}
	count++;
	int sum = 0;
	int tgt = 0;
	int n = (int)pow(2, count - 1);
	for (int i = 0; i < count; i++)
	{
		int s = 0;
		sscanf(ch + tgt, "%d", &s);
		sum += s;
		while (ch[tgt] && ch[tgt] != ' ')tgt++;
		tgt++;
		if (!ch[tgt])break;
	}
	long long s = (long long)sum * (long long)n;
	printf("%lld", s);
	return 0;
}